<template>
  <div class="searchList con-layout">
    <div class="header">
      <span class="arrow" @click="back_btn"></span>
      <h3 class="title">{{baseTxt}}</h3>
    </div>
    <div class="list-content">
      <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
      <div class="list-item"  @click="golink(item)" v-for="item in list" :key="item.djid">
        <div class="list-top">
          <div class="top-name">
            <span class="name">{{item.djlxmc}}</span>
            <span class="bl" :class="{'red':item.bljg!=1}">{{item.bljgmc}}</span>
          </div>
          <div class="top-time">
            <span>申请日期：{{item.sqsj?item.sqsj :'--'}}</span>
            <span>登记日期：{{item.djsj?item.djsj :'--'}}</span>
          </div>
        </div>
        <div class="list-bottom">
          <span>进度说明：</span>
          <div> {{item.blsm?item.blsm :'--'}}</div>
        </div>
      </div>
     </van-list>
    </div>
    <!-- <prev-btn @back="back_btn"></prev-btn> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      baseTxt: "", //来源名称
      list: [],
      pageNum: 1,
      pageSize: 10,
      loading: false,
      finished: false
    };
  },
  created() {
    this.baseTxt =this.$route.query.type == "1" ? "个人就业登记查询" : "失业登记查询";
  },
  methods: {
    back_btn() {
      this.$router.goBack();
    },
    golink(item){
      this.$router.push({path:'/searchDetail',query:{
        type:this.$route.query.type,
        djlx:item.djlx,
        djid:item.djid
        }})
    },
    onLoad(){
      this.$http({
        url:'/jysydj/sqxxCx',
        method:'get',
        params:{
          ywcz:this.$route.query.type,
          pageNum: this.pageNum,
          pagesize: this.pageSize
        }
      }).then(res=>{
       // 加载状态结束
        this.loading = false;
        this.finished = false;
        let data = res.returnData;
        if (+data.executeResult == 1) {
          this.pageNum++;
          this.list.push(...data.sqxxs);
          if (this.pageNum > res.pageCount) {
            // 数据加载完毕
            this.finished = true;
          }
        } else {
          this.sildeShow = false;
          this.finished = true;
          return false;
        }
      })
    }
  }
};
</script>

<style lang="scss" scoped>
@import "~common/scss/var.scss";
.list-content {
  padding: 33px;
  box-sizing: border-box;
  .list-item {
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0px 3px 13px 0px rgba(8, 8, 61, 0.1);
    padding: 33px 33px 27px 33px;
    margin-top: 21px;
    box-sizing: border-box;
    .list-top{
      border-bottom: 1px dashed #DBDBDB;
      .top-name {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 33px;
        .name {
          font-size: 31px;
          font-weight: 700;
          color: #333333;
          letter-spacing: 1px;
          position: relative;
          &::before {
            content: "";
            width: 13px;
            height: 33px;
            background-color: #06a8f6;
            position: absolute;
            left: -33px;
            z-index: 1;
          }
        }
        .bl {
          font-size: 28px;
          font-weight: 500;
          color: #06a8f6;
          letter-spacing: 1px;
        }
        .yellow{
          color: #FF9800;
        }
        .red{
          color: #F44336;
        }
      }
      .top-time{
        display: flex;
        align-items: center;
        justify-content:space-between;
        font-size: 25px;
        color: #333333;
        margin-bottom: 21px;
      }
    }
    .list-bottom{
      margin-top: 19px;
      display: flex;
      align-items:baseline;
      justify-content: space-between;
      span{
        flex: 2;
      }
      div{
        flex: 6;
        color: #333333;
        font-size: 25px;
        line-height: 35px;
      }
    }
  }
}
</style>
